package io.renren.modules.maintenance.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.modules.maintenance.entity.MService;
import io.renren.modules.maintenance.mapper.MServiceMapper;
import io.renren.modules.maintenance.service.IMServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author iweb
 * @since 2020-08-07
 */
@Service
public class MServiceServiceImpl extends ServiceImpl<MServiceMapper, MService> implements IMServiceService {
    @Autowired
    MServiceMapper mServiceMapper;

    @Override
    public int selectServiceIdByName(String name) {

        MService mService = mServiceMapper.selectOne(new QueryWrapper<MService>().eq("name", name));
        return mService.getServiceId();
    }
}
